/*******************************************************************************
 * Size: 26 px
 * Bpp: 1
 * Opts: --bpp 1 --size 26 --font D:/UI2/1/assets/simfang.ttf -o D:/UI2/1/assets\ui_font_Font1.c --format lvgl --symbols 登录用户名密码返回 --no-compress --no-prefilter
 ******************************************************************************/

#include "../ui.h"

#ifndef UI_FONT_FONT1
#define UI_FONT_FONT1 1
#endif

#if UI_FONT_FONT1

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+540D "名" */
    0x0, 0x8, 0x0, 0x0, 0x80, 0x0, 0x18, 0x0,
    0x1, 0x0, 0x0, 0x20, 0x20, 0x4, 0xfe, 0x0,
    0xf0, 0x40, 0x18, 0x8, 0x3, 0x1, 0x0, 0x6c,
    0x20, 0x8, 0x64, 0x1, 0x2, 0x80, 0x0, 0x10,
    0x0, 0x2, 0x0, 0x0, 0xc0, 0x10, 0x1f, 0xff,
    0x6, 0x40, 0x30, 0x84, 0x2, 0x70, 0x40, 0x20,
    0x4, 0x2, 0x0, 0x40, 0x20, 0x4, 0x2, 0x0,
    0x7f, 0xe0, 0x4, 0x0, 0x0, 0x40, 0x0,

    /* U+56DE "回" */
    0x80, 0x0, 0xd0, 0x3f, 0xe7, 0xf0, 0x9, 0x0,
    0x2, 0x40, 0x0, 0x90, 0x2, 0x24, 0x7f, 0x89,
    0x18, 0x42, 0x44, 0x10, 0x91, 0x4, 0x24, 0x41,
    0x9, 0x1f, 0xe2, 0x46, 0x0, 0x91, 0x0, 0x24,
    0x0, 0x9, 0x0, 0x2, 0x40, 0x4, 0x9f, 0xff,
    0xe4, 0x0, 0x19, 0x0, 0x4, 0x0, 0x0, 0x0,

    /* U+5BC6 "密" */
    0x0, 0x80, 0x0, 0x6, 0x0, 0x20, 0x20, 0x2,
    0x3, 0xff, 0x3f, 0xff, 0xe4, 0x0, 0x4, 0x40,
    0x82, 0x4, 0x6, 0x40, 0x4, 0x48, 0x81, 0x21,
    0x6, 0x21, 0x22, 0x12, 0xc, 0x10, 0x41, 0xf1,
    0x0, 0x60, 0xf8, 0xc, 0x40, 0x3, 0x2, 0x0,
    0xc0, 0x20, 0x80, 0x82, 0x8, 0x8, 0x20, 0x80,
    0x82, 0x8, 0x8, 0x20, 0x80, 0xff, 0xf8, 0x8,
    0x1, 0x0, 0x0, 0x0,

    /* U+5F55 "录" */
    0x0, 0x0, 0x0, 0x0, 0x7c, 0x0, 0x7e, 0x20,
    0x0, 0x0, 0x80, 0x0, 0x2, 0x0, 0xf, 0xe8,
    0x0, 0x0, 0x20, 0x0, 0x0, 0xbc, 0x3, 0xff,
    0x1, 0xf0, 0x82, 0x0, 0x2, 0x8, 0x3, 0x8,
    0x60, 0x6, 0x32, 0x0, 0x8, 0xb0, 0x0, 0xa,
    0x40, 0x0, 0xc8, 0x80, 0xc, 0x21, 0x0, 0x40,
    0x82, 0x6, 0x2, 0xc, 0x0, 0x8, 0x1f, 0x1,
    0x20, 0x0, 0x3, 0x80, 0x0, 0x6, 0x0, 0x0,
    0x0, 0x0,

    /* U+6237 "户" */
    0x0, 0x20, 0x0, 0x2, 0x0, 0x0, 0x60, 0x0,
    0x4, 0x0, 0x40, 0x0, 0x4, 0xf, 0xc0, 0xff,
    0x10, 0x10, 0x2, 0x2, 0x0, 0x40, 0x40, 0x8,
    0x8, 0x1, 0x1, 0x0, 0xe0, 0x3f, 0xe0, 0xc,
    0x0, 0x1, 0x0, 0x0, 0x20, 0x0, 0x4, 0x0,
    0x1, 0x0, 0x0, 0x20, 0x0, 0x8, 0x0, 0x2,
    0x0, 0x0, 0x40, 0x0, 0x10, 0x0, 0x4, 0x0,
    0x0,

    /* U+7528 "用" */
    0x0, 0x0, 0x0, 0x80, 0x3, 0x4, 0xff, 0xe0,
    0x71, 0x2, 0x4, 0x10, 0x20, 0x41, 0x2, 0x4,
    0x10, 0x20, 0x47, 0xfa, 0x5, 0xd0, 0x20, 0x41,
    0x2, 0x4, 0x10, 0x20, 0x41, 0x12, 0x9, 0xff,
    0x20, 0x91, 0x2, 0x8, 0x10, 0x20, 0x81, 0x2,
    0x10, 0x10, 0x21, 0x1, 0x2, 0x10, 0x10, 0x22,
    0x1, 0x2, 0x40, 0x11, 0x24, 0x1, 0xe, 0x80,
    0x0, 0x60, 0x0, 0x0,

    /* U+767B "登" */
    0x0, 0x10, 0x80, 0x0, 0xd1, 0x0, 0xf, 0x14,
    0x0, 0x62, 0x31, 0x0, 0x8, 0x23, 0x1, 0x10,
    0x4c, 0x1, 0x40, 0x60, 0x3, 0x83, 0x40, 0x3,
    0xfd, 0x80, 0x8, 0x0, 0x80, 0x20, 0x4, 0x80,
    0x89, 0xf9, 0xf2, 0x1e, 0x20, 0x8, 0x20, 0x40,
    0x0, 0x40, 0x80, 0x0, 0x9f, 0x80, 0x1, 0xc4,
    0x0, 0x2, 0xc, 0x0, 0x2, 0x10, 0x0, 0x6,
    0x20, 0x0, 0x4, 0x87, 0x0, 0x7f, 0xf0, 0x7,
    0x80, 0x0, 0x0,

    /* U+7801 "码" */
    0x0, 0x0, 0x20, 0x0, 0x7f, 0x80, 0xe, 0x82,
    0xf, 0xc0, 0x8, 0x2, 0x4, 0x20, 0x18, 0x10,
    0x80, 0x40, 0x44, 0x3, 0x2, 0x10, 0x8, 0x88,
    0x40, 0x7f, 0x21, 0x1, 0x88, 0x84, 0xca, 0x22,
    0xff, 0x48, 0x9c, 0xa, 0x22, 0x0, 0x20, 0x88,
    0x0, 0x83, 0xe0, 0x2, 0x8, 0xf, 0xd8, 0x21,
    0xe0, 0x40, 0x0, 0x1, 0x0, 0x0, 0x4, 0x0,
    0x1, 0xa0, 0x0, 0x3, 0x80, 0x0, 0x6, 0x0,
    0x0, 0x0,

    /* U+8FD4 "返" */
    0x0, 0x0, 0x20, 0x20, 0x81, 0xc0, 0x20, 0x9c,
    0x0, 0x21, 0xc0, 0x0, 0x62, 0x0, 0x0, 0x4,
    0x4, 0x0, 0x8, 0x38, 0x0, 0x1f, 0xb0, 0x3,
    0x20, 0x40, 0x3c, 0x40, 0x81, 0x88, 0x92, 0x0,
    0x21, 0x14, 0x0, 0x44, 0x10, 0x0, 0x88, 0x50,
    0x1, 0x11, 0x10, 0x1, 0x44, 0x18, 0x5, 0x10,
    0x10, 0xa, 0x40, 0x3, 0xfc, 0x0, 0x0, 0x7,
    0x80, 0x0, 0x0, 0xe0, 0x0, 0x0, 0x3f, 0xc0,
    0x0, 0x8, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 416, .box_w = 20, .box_h = 25, .ofs_x = 1, .ofs_y = -3},
    {.bitmap_index = 63, .adv_w = 416, .box_w = 18, .box_h = 21, .ofs_x = 4, .ofs_y = -2},
    {.bitmap_index = 111, .adv_w = 416, .box_w = 20, .box_h = 24, .ofs_x = 3, .ofs_y = -3},
    {.bitmap_index = 171, .adv_w = 416, .box_w = 22, .box_h = 24, .ofs_x = 3, .ofs_y = -3},
    {.bitmap_index = 237, .adv_w = 416, .box_w = 19, .box_h = 24, .ofs_x = 2, .ofs_y = -3},
    {.bitmap_index = 294, .adv_w = 416, .box_w = 20, .box_h = 24, .ofs_x = 2, .ofs_y = -3},
    {.bitmap_index = 354, .adv_w = 416, .box_w = 23, .box_h = 23, .ofs_x = 2, .ofs_y = -2},
    {.bitmap_index = 421, .adv_w = 416, .box_w = 22, .box_h = 24, .ofs_x = 2, .ofs_y = -3},
    {.bitmap_index = 487, .adv_w = 416, .box_w = 23, .box_h = 23, .ofs_x = 1, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x2d1, 0x7b9, 0xb48, 0xe2a, 0x211b, 0x226e, 0x23f4,
    0x3bc7
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 21517, .range_length = 15304, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 9, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 1,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
    .cache = &cache
#endif
};



/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t ui_font_Font1 = {
#else
lv_font_t ui_font_Font1 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 25,          /*The maximum line height required by the font*/
    .base_line = 3,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -2,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
    .fallback = NULL,
#endif
    .user_data = NULL,
};



#endif /*#if UI_FONT_FONT1*/

